<style>
tr.striped {
        background-color: #0ec0cc;
}
</style>
<body>
<form id ="bulk-news-form" action="/en/news/ajax/bulk-news" method="POST">
<!--  use action in common module -->
<?if(isset($this->viewParams['newsList']) && count($this->viewParams['newsList']) > 0) :?>
<table border = '1' width='100%' id = "show-table">
	<tr align ="center">
		<td>
		</td>
		<td>
			<?=t(27) ?>
		</td>
		<td>
			<?=t(13) ?>
		</td>
		<td>
			<?=t(14) ?>
		</td>
		<td>
			<?=t(2) ?>
		</td>
		<td>
			<?=t(15) ?>
		</td>
		<td>
			<?=t(84) ?>
		</td>
		<td>
			<?=t(29) ?>
		</td>
	</tr>
	
	<? foreach ($this->viewParams['newsList'] as $row) :?>
	<?//$row = $this->m->transformToFormArray($row); ?>
	<tr id="news-row-<?=$row['id']?>">
		<td width = "10" align="center" valign = "top">
			<input type="checkbox" value="<?=$row['id'] ?>" class="newsIdClass" name="news_ids[<?=$row['id'] ?>]"/>
		</td>
		<td>
			#<?=$row['id']?>
		</td>
		<td>
			<a href="<?=$this->hvnUrl(array('module' => 'news', 'action' => 'view'))?>?id=<?=$row['id']?>" > <?=$row['title'] ?></a>
		</td>
		<td>
			<?=$row['category'] ?>
		</td>
		<td id= "news-status-<?=$row['id'] ?>">
			<?=$row['status'] ?>
		</td>
		<td>
			<?=$row['keywords'] ?>
		</td>
		<td>
			<?=date("d.m.y", $row['post_time'])  ?>
		</td>
    	<td width="20%"><a href="<?=$this->hvnUrl(array('module' => 'news', 'action' => 'edit'))?>?id=<?=$row['id']?>"><?=t(38) ?></a>
            <a id = "delete-news-<?=$row['id']?>" href="javascript:void()"><?=t(31) ?></a>
        </td> 
	</tr>
	<?endforeach ?>
</table>
<?else:?>
<!--</?=t(205) ?>-->
<?endif ?>   

<br />
<div style="width:100%;float: right" id = "paging">
<?if(isset($this->viewParams['paginator'])) :?>
<?= $this->paginationControl($this->viewParams['paginator'], 'Sliding', '/modules/news/views/scripts/commonTheme/commonLang/common/admin_pagination_control.phtml'); ?>
<?endif?>
</div>
<div  style="background-color:#EEEEEE">
<?=t(30) ?>: 
<select name='bulkaction' id ="bulk" >
<?if(true): //TODO: isadmin()?>
<option value='delete'> <?=t(31) ?> </option>
<?endif ?>
<option value='status'> <?=t(32) ?> </option>
</select>

<select name='changestatus' id ="changeStatus" style=" display:none">
<option value='featured'> <?=t(33) ?> </option>
<option value='published'> <?=t(34) ?> </option>
<option value='queued'> <?=t(35) ?> </option>
<option value='unpublished'> <?=t(36) ?> </option>
<option value='deleted'> <?=t(37) ?> </option>
</select>
<input type="submit" value="Apply" id="bulk-submit" name="op"/>
</div>
</form>


</body>